from controller.hypervisor import Hypervisor
import libvirt


class KVM(Hypervisor):

    def __init__(self):
        Hypervisor.__init__(self)
        self.conn = libvirt.open('qemu:///system')
        KVM_PATH = 'image/kvm'
        if self.conn is None:
            raise Exception('Failed to open connection to the qemu hypervisor')
        self.VM_path = KVM_PATH
